Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details to RequestDeviceError. #4145

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Sep 15, 2023

Checklist

  • Run cargo clippy.
  • Run cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Basically just like #4066 — giving the same treatment to RequestDeviceError as InstanceError and CreateSurfaceError got.

Description
This will allow developers, particularly those in communication with users with hardware they don't own, to diagnose “why won't this work on my machine” better, without needing to obtain logs in addition to the error value.

Note that this is a semver-breaking change because RequestDeviceError no longer implements PartialEq, and cannot be constructed outside the crate. (Just like #4066.)

Testing
Added a test case and ran it in CI.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@cwfitzgerald cwfitzgerald merged commit 7c575a0 into gfx-rs:trunk Sep 16, 2023
21 checks passed
bradwerth pushed a commit to bradwerth/wgpu that referenced this pull request Sep 19, 2023
@kpreid kpreid deleted the error-device branch September 25, 2023 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants